package com.slz3.business.frame.enums;

import lombok.AllArgsConstructor;

/**
 * 审核状态
 * <p>
 * 适用于所有 模块-菜单
 * <p>
 * 待提交              WAIT_SUBMIT
 * 待审核              WAIT_AUDIT      ←   [AuditSubmit]
 * 已审核 / 通过       APPROVED        ←   [Audit]
 * 被驳回 / 驳回       REJECT          ←   [AuditReject]
 * <p>
 * 一条记录创建后的初始状态为【待提交】
 */
@AllArgsConstructor
public enum AuditFlag {
    WAIT_SUBMIT("待提交", "待提交"),
    WAIT_AUDIT("待审核", "待审核"),
    APPROVED("已审核", "通过"),
    REJECT("被驳回", "驳回");
    private String nickname;
    private String nickname2;

    public static boolean isWaitSubmit(AuditFlag auditFlag) {
        return WAIT_SUBMIT.equals(auditFlag);
    }

    public static boolean isWaitAudit(AuditFlag auditFlag) {
        return WAIT_AUDIT.equals(auditFlag);
    }

    public static boolean isApproved(AuditFlag auditFlag) {
        return APPROVED.equals(auditFlag);
    }

    public static boolean isReject(AuditFlag auditFlag) {
        return REJECT.equals(auditFlag);
    }
}
